<?php 
/* SVN FILE: $Id$ */
/* Category Test cases generated on: 2009-05-30 15:05:58 : 1243711558*/
App::import('Model', 'Category');

class CategoryTestCase extends CakeTestCase {
	var $Category = null;
	var $fixtures = array('app.category', 'app.category', 'app.attribute', 'app.category', 'app.goods_cat');

	function startTest() {
		$this->Category =& ClassRegistry::init('Category');
	}

	function testCategoryInstance() {
		$this->assertTrue(is_a($this->Category, 'Category'));
	}

	function testCategoryFind() {
		$this->Category->recursive = -1;
		$results = $this->Category->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('Category' => array(
			'id'  => 1,
			'cat_name'  => 'Lorem ipsum dolor sit amet',
			'keywords'  => 'Lorem ipsum dolor sit amet',
			'cat_desc'  => 'Lorem ipsum dolor sit amet',
			'sort_order'  => 1,
			'template_file'  => 'Lorem ipsum dolor sit amet',
			'measure_unit'  => 'Lorem ipsum d',
			'show_in_nav'  => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida,phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam,vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit,feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
			'style'  => 'Lorem ipsum dolor sit amet',
			'is_show'  => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida,phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam,vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit,feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
			'grade'  => 1,
			'category_id'  => 1,
			'attribute_id'  => 1
		));
		$this->assertEqual($results, $expected);
	}
}
?>